<!-- 海报模块 -->
<template>
  <div class="poster_module">
    <van-image class="poster_img" :src="require(`@/assets/birthday.png`)" @load="load = true">
      <template v-slot:loading>
        <van-loading type="spinner" size="20" />
      </template>
    </van-image>
    <div v-if="load" class="bless_text">
      <div class="medal_box">
        <!-- <van-image class="medal_img" :src="require(`@/assets/birthday.png`)" @load="load = true">
          <template v-slot:loading>
            <van-loading type="spinner" size="20" />
          </template>
        </van-image> -->
        <div>勋章图</div>
      </div>
      <div class="characters_box">
        <div class="name">{{ posterData.name }}</div>
        <div class="text">{{ posterData.text }}</div>
      </div>
    </div>
  </div>
</template>

<script>
import { Image as VanImage } from 'vant'
export default {
  components: { VanImage },
  data() {
    return {
      load: false,
      posterData: {
        name: 'XX员工',
        image: '@/assets/birthday.png',
        text: '周年祝福'
      }
    }
  }
}
</script>

<style lang="less" scoped>
.poster_module {
  width: 100%;
  position: relative;
  .poster_img {
    width: 100%;
  }
  .bless_text {
    width: 100%;
    position: absolute;
    left: 0;
    top: 22%;
    .medal_box {
      display: flex;
      justify-content: center;
      margin-bottom: 15px;
      .medal_img {
        width: 30%;
      }
    }
    .characters_box {
      width: 100%;
      .name {
        text-align: center;
        font-size: 40px;
        font-weight: bolder;
        margin-bottom: 15px;
      }
      .text {
        line-height: 46px;
        margin: 0 7%;
      }
    }
  }
}
</style>
